package com.work.vo.transport;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 货运舱单VO
 *
 * @author ：dujianyu
 * @since ：Created in 2024/2/20 13:59
 */
@Data
public class TransportBillVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "舱单ID")
    private Long tShipBillId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "货运舱单ID")
    private Long transportBillId;

    @ApiModelProperty(value = "进出口")
    private String iE;

    @ApiModelProperty(value = "进出口")
    private String ieName;

    public String getIeName() {
        switch (iE) {
            case "E":
                return "出口";
            case "I":
                return "进口";
            case "CZ":
                return "存栈";
            default:
                return "";
        }
    }

    @ApiModelProperty(value = "舱单号")
    private String billNo;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "船ID")
    private Long transportShipId;

    @ApiModelProperty(value = "货类")
    private String cargoType;

    @ApiModelProperty(value = "货类")
    private String cargoTypeName;

    @ApiModelProperty(value = "包装")
    private String packageType;

    @ApiModelProperty(value = "包装")
    private String packageTypeName;

    @ApiModelProperty(value = "件数")
    private Integer piece;

    @ApiModelProperty(value = "吨数")
    private BigDecimal ton;

    @ApiModelProperty(value = "件数")
    private Integer allPiece;

    @ApiModelProperty(value = "吨数")
    private BigDecimal allTon;

    @ApiModelProperty(value = "产地")
    private String productionPlace;

    @ApiModelProperty(value = "产地")
    private String productionPlaceName;

    @ApiModelProperty(value = "货代")
    private String cargoAgent;

    @ApiModelProperty(value = "货代")
    private String cargoAgentName;

    @ApiModelProperty(value = "货主")
    private String cargoOwner;

    @ApiModelProperty(value = "货主")
    private String cargoOwnerName;

    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(value = "联系人")
    private String contactPerson;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "海关放行")
    private String isPass;

}
